home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / clib / bzero.c < prev    next >
C/C++ Source or Header  |  1996-10-29  |  803b  |  52 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: bzero.c,v 1.1 1996/10/29 03:01:26 aros Exp $
  4.  
  5.     Desc: bzero()
  6.     Lang: english
  7. */
  8. #include <clib/exec_protos.h>
  9.  
  10. /*****************************************************************************
  11.  
  12.     NAME */
  13.     #include <string.h>
  14.  
  15.     void bzero (
  16.  
  17. /*  SYNOPSIS */
  18.     void *       ptr,
  19.     size_t       len)
  20.  
  21. /*  FUNCTION
  22.     Write len zero bytes to ptr. If len is zero, does nothing.
  23.  
  24.     INPUTS
  25.     ptr - The first byte of the area in memory to be cleared.
  26.     len - How many bytes to clear.
  27.  
  28.     RESULT
  29.  
  30.     NOTES
  31.  
  32.     EXAMPLE
  33.  
  34.     BUGS
  35.  
  36.     SEE ALSO
  37.  
  38.     INTERNALS
  39.  
  40.     HISTORY
  41.     28-10-96    ldp created
  42.  
  43. ******************************************************************************/
  44. {
  45.     char * ptr2 = ptr;
  46.  
  47.     while(len--)
  48.     *ptr2++ = 0;
  49.  
  50. } /* bzero */
  51.  
  52.